import request from './requests.js'
import axios from 'axios'
import qs from 'qs'
import {
	sku_account_success_in_url
} from "./setting.js"

import {
	Toast
} from 'vant'

import {
	getLocalTime
} from "./date.js"



function sku_account_success(sku_account_id, callBack) {

	request({
		method: 'POST',
		url: sku_account_success_in_url,
		data: qs.stringify({ //这里是发送给后台的数据
			sku_account_id: sku_account_id
		})
	}).then((response) => { //这里使用了ES6的语法
		// console.log(response) //请求成功返回的数据
		let res = response.data.resultBody
		
		callBack(res)


	}).catch((error) => {
		// console.log(response)
		console.log(error) //请求失败返回的数据
		Toast('接口请求失败，请联系管理员！')
	})


}



export default sku_account_success